package com.yan.utils;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

import java.util.Map;

public class FastJsonUtils {

    public JSONObject parseString(String text) {
        JSONObject obj = (JSONObject) JSON.parse(text);
        return obj;
    }

    public JSONObject parseObject(String text) {
        JSONObject obj = (JSONObject) JSON.parseObject(text);
        return obj;
    }

    public String get(Object obj) {
        String str = JSON.toJSONString(obj);
        return str;
    }


    public static void main(String[] args) {
        String obj = "{\"orderId\": \"IN1709290954569503,IN1709290955049504,IN1710182006190688\"}";
        System.out.println(obj);
        Map<String, String> map = JSONObject.parseObject(obj, Map.class);
        System.out.println(map);


    }


}
